﻿/// <reference path="AttachedHandler.js" />
/// <reference path="../Browser.js" />


function MouseWheelHandler(obj, handler, binding, argument_list)
{
	this.AttachedHandler(obj, "mousewheel", handler, binding);
}
MouseWheelHandler.Inherit(AttachedHandler);

if (____a)
{
	MouseWheelHandler.prototype = new AttachedHandler();
	MouseWheelHandler.prototype.AttachedHandler = new AttachedHandler();

}

MouseWheelHandler.prototype.get_AddType = function get_AddType()
{
	if (Browser.get_Name() == "Firefox")
		return "DOMMouseScroll";
	return this._type;
}
MouseWheelHandler.prototype._BindHandler = function _BindHandler(argList)
{
	if (Browser.get_Name() == "Firefox")
	{
		var o = this._binding, f = AttachedHandler.ResolveHandler(this._handler), args = argument_list;
		if (o == null) o = this._obj;

		return function BoundHandler_MouseWheel(e)
		{
			var args2 = Events._GetArguments(arguments);

			e.wheelDelta = e.detail * -40;

			return f.apply(o, args.concat(args2));
		};
	}
	return this.AttachedHandler._BindHandler.call(this, argList);
}